﻿using Abp.AutoMapper;
using Akso.Entities;
using Akso.Infrastructure.Data.Annotations;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Akso.Bills.Dto
{
    /// <summary>
    /// 新增、编辑页面显示数据时的Dto对象，可以被其它Dto使用。
    /// </summary>
    [AutoMap(typeof(Bill))]
    public class BillEditDto
    {
        public Guid? Id { get; set; }
        [Required]
        [MaxLength(Bill.MaxNameLength)]
        public string SchoolName { get; set; }
        public Guid SchoolId  { get; set; }
        /// <summary>
        /// 收支日期
        /// </summary>
        public DateTime BillDate { get; set; }
        /// <summary>
        /// 账单类型
        /// </summary>
        public int BillTypeId { get; set; }
        /// <summary>
        /// 收支类别
        /// </summary>
        [MaxLength(Bill.MaxIncomeExpendTypeLength)]
        public string IncomeExpendType { get; set; }
        public Guid IncomeExpendTypeId { get; set; }
        /// <summary>
        /// 收支账户
        /// </summary>
        [MaxLength(Bill.MaxBillAccountLength)]
        public string BillAccount { get; set; }
        public Guid BillAccountId { get; set; }
        /// <summary>
        /// 收入金额
        /// </summary>
        [DecimalPrecision(10, 2)]
        public decimal IncomeAmount { get; set; }
        /// <summary>
        /// 支出金额
        /// </summary>
        [DecimalPrecision(10, 2)]
        public decimal ExpendAmount { get; set; }
        /// <summary>
        /// 收支备注
        /// </summary>
        [MaxLength(Bill.MaxRemarkLength)]
        public string Remark { get; set; }
        /// <summary>
        /// 核算项目
        /// </summary>
        [MaxLength(Bill.MaxCheckProjectLength)]
        public string CheckProject { get; set; }
        public Guid? CheckProjectId { get; set; }
        /// <summary>
        /// 核算客户
        /// </summary>
        [MaxLength(Bill.MaxCheckCustomerLength)]
        public string CheckCustomer { get; set; }
        public Guid? CheckCustomerId { get; set; }
        /// <summary>
        /// 核算用户
        /// </summary>
        [MaxLength(Bill.MaxCheckUserLength)]
        public string CheckUser { get; set; }
        public Guid? CheckUserId { get; set; }
    }
}
